package com.a2p1k02.supersword;

import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import org.apache.logging.log4j.Logger;

@Mod(modid = SuperItemsMod.MODID, name = SuperItemsMod.NAME, version = SuperItemsMod.VERSION)
public class SuperItemsMod
{
    public static final String MODID = "super_items";
    public static final String NAME = "Super Duper Items";
    public static final String VERSION = "1.0";

    private static Logger logger;

    public static Item.ToolMaterial superSwordMaterial;
    public static Item superSword;

    public static Item.ToolMaterial superPickaxeMaterial;
    public static Item superPickaxe;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        superSwordMaterial = EnumHelper.addToolMaterial("Super Material", 4, 1000,
                20.0f, 1000.f, 30);
        superSword = new SuperSword();

        superPickaxeMaterial = EnumHelper.addToolMaterial("Super Material", 4, 1000,
                60.0f, 10.f, 30);
        superPickaxe = new SuperPickaxe();

        logger = event.getModLog();
    }

    @EventHandler
    public void init(FMLInitializationEvent event)
    {
        // some example code
        logger.info("DIRT BLOCK >> {}", Blocks.DIRT.getRegistryName());
    }
}
